package com.wave.wavesystem.serve.enums.user;

import com.wave.common.model.KV;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;


@AllArgsConstructor
@Getter
public enum UserStatusEnum {

    NORMAL(0, "正常"),
    BAN(1, "封禁");

    private final int code;
    private final String text;

    public static List<KV<String, Integer>> list() {
        return Arrays.stream(UserStatusEnum.values())
                .map(item -> new KV<>(item.getText(), item.getCode())).toList();
    }

}
